<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
<<<<<<< HEAD
=======
use Illuminate\Database\Eloquent\SoftDeletes;//软删除
>>>>>>> 3cbfde5c21633bb47be419577bca65cd8c0581b5

class User extends Authenticatable
{
    use Notifiable;
<<<<<<< HEAD

=======
    use SoftDeletes;
>>>>>>> 3cbfde5c21633bb47be419577bca65cd8c0581b5
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'account', 'user_name', 'password', 'status', 'rating'
    ];

<<<<<<< HEAD
=======
    protected $dates = ['deleted_at'];
>>>>>>> 3cbfde5c21633bb47be419577bca65cd8c0581b5
    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    public  function posts()
    {
        return $this->hasMany('App\Post');
    }

    public function messages()
    {
        return $this->hasMany('App\Message');
    }
}
